#pragma once
#include "ChatBaseDoc.h"
#include "UDPProxyClient.h"

// CChatClientDoc document


class NatPunchthroughClient;
class CChatClientBaseDlg;

class CChatClientDoc : public CChatBaseDoc
{
	NatPunchthroughClient*	m_pNatPunchthroughClient;
	RakNet::UDPProxyClient* m_pUdpProxyClient;

	DECLARE_DYNCREATE(CChatClientDoc)
	
public:
	CChatClientDoc();
	virtual ~CChatClientDoc();
	
	void		SwitchDlg(CChatClientBaseDlg& oldChatClientBaseDlg, CChatClientBaseDlg& newChatClientBaseDlg);
	
	bool		UseHolePunchingModel(const RakNetGUID& destination, const SystemAddress& facilitator);
	void		UseProxyModel(RakNet::UDPProxyClientResultHandler& resultHandler, const SystemAddress& proxyCoordinator, const SystemAddress& sourceAddress, const RakNetGUID& targetGuid, RakNetTimeMS timeoutOnNoDataMS, RakNet::BitStream *serverSelectionBitstream=0);
	
#ifndef _WIN32_WCE
	virtual void Serialize(CArchive& ar);   // overridden for document i/o
#endif
#ifdef _DEBUG
	virtual void AssertValid() const;
#ifndef _WIN32_WCE
	virtual void Dump(CDumpContext& dc) const;
#endif
#endif

protected:
	virtual BOOL OnNewDocument();
	
	DECLARE_MESSAGE_MAP()
};
